﻿
    using Chain.BLL;
    using System;
    using System.Data;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public partial class UserWork : PageBase
    {


        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                this.hdUserID.Value = this._UserID.ToString();
                this.hdShopID.Value = this._UserShopID.ToString();
                this.lblUserName.InnerText = base._UserName;
                SysUserWork bllsysuserwork = new SysUserWork();
                DataTable dtuserwork = bllsysuserwork.GetList(1, string.Format("UserID = {0}", base._UserID), "EedTime DESC").Tables[0];
                DataTable dtyfmoney = bllsysuserwork.GetList(string.Format("ispay = 0 and HandoverUserID = {0}", base._UserID)).Tables[0];
                if (dtuserwork.Rows.Count > 0)
                {
                    this.hdStartTime.Value = dtuserwork.Rows[0]["EedTime"].ToString();
                }
                else
                {
                    this.hdStartTime.Value = "1949-10-01";
                }
                double summoney = 0.0;
                foreach (DataRow dr in dtyfmoney.Rows)
                {
                    summoney += Convert.ToDouble(dr["Arrearage"]);
                }
                this.hdEndTime.Value = DateTime.Now.ToString();
                this.hdallmoney.Value = summoney.ToString();
            }
        }
    }


